﻿using B.S.DataBase.MyProject.Domain.Sales;
using B.S.DataBase.MyProject.ErrorCode;
using MediatR;

namespace T.E.ERP.Write.API.Applicantions.Command.SaleOrderInfoCommand
{
    public class AddSaleOrderInfoCommand:IRequest<APIResult<object>>
    {
        public Guid Id { get; set; }
        /// <summary>
        /// 业务类型  1销售订单 2采购入库 3销售出库
        /// </summary>
        public int BusinessType { get; set; } = 1;
        /// <summary>
        /// 业务状态（1:正常，2:挂起，3:手工关闭，4:系统关闭）
        /// </summary>
        public int BusinessStatus { get; set; } = 1;
        /// <summary>
        /// 单据类型  1:业务订单 2：入库单  3:出库单
        /// </summary>
        public int DocumentType { get; set; } = 1;
        /// <summary>
        /// 5单据状态（0:开立 1:退回  2：审核）
        /// </summary>
        public int DocumentStatus { get; set; } = 0;
        /// <summary>
        /// 操作员
        /// </summary>
        public string? Oprator { get; set; }
        /// <summary>
        /// 客户名称
        /// </summary>
        public int? CustomerId { get; set; }
        /// <summary>
        /// 单据日期（默认当前日期：）
        /// </summary>
        public DateTime DocumentDate { get; set; } = DateTime.Now;
        /// <summary>
        /// 收货人
        /// </summary>
        public string? Receiver { get; set; }

        /// <summary>
        /// 审核员
        /// </summary>
        public string? ExamUser { get; set; }
        /// <summary>
        /// 合同号
        /// </summary>
        public string? Contract { get; set; }
        /// <summary>
        /// 电话
        /// </summary>
        public string? Phone { get; set; }

        /// <summary>
        /// 销售部门
        /// </summary>
        public int? SaleDempt { get; set; }
        /// <summary>
        /// 审核日期
        /// </summary>
        public DateTime ExamDate { get; set; } = DateTime.Now;
        /// <summary>
        /// 付款日期
        /// </summary>
        public DateTime PayDate { get; set; } = DateTime.Now;
        /// <summary>
        /// 地址
        /// </summary>
        public string? Address { get; set; }
        /// <summary>
        /// 销售人员
        /// </summary>
        public string? SaleUser { get; set; }
        /// <summary>
        /// 销售类型[1 国内品牌  2 外购成品  3 外购原料  4  自接订单  5 自制销售  6 客供销售]
        /// </summary>
        public int? SaleType { get; set; }
        /// <summary>
        /// 交付日期
        /// </summary>
        public DateTime DeliverDate { get; set; } = DateTime.Now;
        /// <summary>
        /// 目的国家
        /// </summary>
        public string? GoalCountry { get; set; }
        /// <summary>
        /// 供货方式
        /// </summary>
        public int? SupplyType { get; set; }
        /// <summary>
        /// 交期状态（预计 确认）
        /// </summary>
        public bool? DeliveryStatus { get; set; }
        /// <summary>
        /// 备注信息
        /// </summary>
        public string? Remark { get; set; }
        public List<OrderMaterials> OrderMaterials { get; set; }
    }
}
